import axios from 'axios';
let baseUrl='http://60.205.188.207:8010';
axios.interceptors.request.use(function (config) {
    config.headers.common['authorization']='Bearer '+localStorage.getItem('token')
    return config;
  }, function (error) {
    return Promise.reject(error);
  });
export const GET=(url,params)=>{
    return axios.get(`${baseUrl}${url}`,params).then((data)=>{
        return data
    })
}
export const POST=(url,params)=>{
    return axios.post(`${baseUrl}${url}`,params).then((data)=>{
        return data
    })
}

export const PUT=(url,params)=>{
    return axios.put(`${baseUrl}${url}`,params).then((data)=>{
        return data
    })
}
export const DELETE=(url,params)=>{
    return axios.delete(`${baseUrl}${url}`,params).then((data)=>{
        return data
    })
}